﻿using DoNet.Common.App;
using DoNet.Common.Options;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace DoNet.Common.Helpers
{
    public class AppHelper
    {
        public AppHelper()
        {
            //Services.
        }
        /// <summary>
        /// 全局配置选项
        /// </summary>
        //public static IConfiguration Configuration { get; set; }
        /// <summary>
        ///  应用服务
        /// </summary>
        //public static IServiceCollection Services;
        /// <summary>
        /// 获取请求上下文
        /// </summary>
        public static HttpContext? HttpContext => HttpContextLocal.Current();
        /// <summary>
        /// 服务提供器
        /// </summary>
        //public static IServiceProvider ServiceProvider => HttpContext?.RequestServices ?? Services.BuildServiceProvider();
        /// <summary>
        /// 用户信息
        /// </summary>
        //public static UserInfo User { get; set; }
    }
}
